package com.example.user.controller;

import com.example.model.vo.ResponseResult;
import com.example.user.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: ft
 * @Date:2025/8/25
 * @Description: 相关单据：
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    private StringRedisTemplate stringRedisTemplate;

    @Autowired
    UserService userService;

    @PostMapping("/login")
    public ResponseResult<Object> login(@RequestParam("username") String username, @RequestParam("password") String password) {

        return userService.login(username, password);
    }


}